package guild

import "xr-game-server/entity"

type MemberByUpdateAt []*entity.GuildMember

func (a MemberByUpdateAt) Len() int {
	return len(a)
}
func (a MemberByUpdateAt) Less(i, j int) bool {
	return a[i].UpdatedAt.Before(a[j].UpdatedAt)
}
func (a MemberByUpdateAt) Swap(i, j int) {
	a[i], a[j] = a[j], a[i]
}

type ApplyByUpdateAt []*entity.GuildApplication

func (a ApplyByUpdateAt) Len() int {
	return len(a)
}
func (a ApplyByUpdateAt) Less(i, j int) bool {
	return a[i].UpdatedAt.Before(a[j].UpdatedAt)
}
func (a ApplyByUpdateAt) Swap(i, j int) {
	a[i], a[j] = a[j], a[i]
}
